package com.lhj.bootdemo.designmode.watcher;

/**
 * @author lhj
 * @version 1.0
 * @date 2022/4/19 10:06 上午
 * @description: 定义观察者
 */

public class UserInterface implements Observer{

    private String name;
    private String msg;

    public UserInterface(String name) {
        this.name = name;
    }
    @Override
    public void update(String message) {
        this.msg = message;
        System.out.println(name + " 收到推送消息： " + msg);

    }
}
